package service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import dao.MessageDao;
import dao.NoteDao;
import entity.Comment;
import entity.Message;
import entity.Note;
import service.MessageService;
import service.NoteService;
@Service("messageService")
public class MessageServiceImpl implements MessageService {
@Resource
private MessageDao messageDao;
	
	@Override
	public Message getMessageByMessageId(int messageId) {
		// TODO Auto-generated method stub
		return messageDao.getMessageById(messageId);
	}
	@Override
	public int addNewMessage(Message message) {
		// TODO Auto-generated method stub
		return messageDao.addNewMessage(message);
	}
	@Override
	public List<Message> getMessageByNoteId(int noteId) {
		// TODO Auto-generated method stub
		return messageDao.getMessageByNoteId(noteId);
	}
	@Override
	public int deleteMessageByMessageId(int messageId) {
		// TODO Auto-generated method stub
		return messageDao.deleteMessagebyId(messageId);
	}

}
